package com.chenwenxuan.sync.console.service;

import java.util.List;

import org.apache.log4j.Logger;

import com.chenwenxuan.sync.console.dao.TaskDao;
import com.chenwenxuan.sync.console.model.Task;

public class MainThreadService {
	
	private Logger logger = Logger.getLogger(MainThreadService.class);
	
	private TaskDao taskDao;
	
	public int countTaskByExecuteGroup(String executeGroup) {
		return taskDao.countTaskByExecuteGroup(executeGroup);
	}
	
	public List <Task> listByExecuteGroup(int startIndex, int amount, String executeGroup) {
		return taskDao.queryTasksByExecuteGroup(startIndex, amount, executeGroup);
	}

	public TaskDao getTaskDao() {
		return taskDao;
	}

	public void setTaskDao(TaskDao taskDao) {
		this.taskDao = taskDao;
	}

}
